$(document).ready(function() {
    Layout.setHeight();
});

var Layout = {
    
    setHeight: function() {
        var contentHeight = parseInt($('#content').css('height'));
        var rightDivHeight = parseInt($('#right').css('height'));
        var leftDivHeight = parseInt($('#left').css('height'));
        
        var max = contentHeight;
        max = rightDivHeight > max ? rightDivHeight : max;
        max = leftDivHeight > max ? leftDivHeight : max;
        
        if(contentHeight < max) {
            contentHeight = max + 15;
            $('#content').css('height', "" + contentHeight + "px");
        }
        
        var leftRightHeight = "" + (max + 25) + "px";
        $('#left').css('height', leftRightHeight);
        $('#right').css('height', leftRightHeight);
    }
}